const app = getApp();
Page({

  /**
   * 页面的初始数据
   */
  data: {
    currentTab: 1,
    conceal: !1,
    serve: !1,
    currentLevel: 1,
    level: 2,
    time: 1,
    avatarUrls: "",
    array: "",
    currentTab: 1,
    takes: false,
  },

  /**
   * 生命周期函数--监听页面加载
   */
  onLoad: function(options) { 
    this.loadings();
    this.setData({
      url: app.globalData.imgUrl,
      userInfo: wx.getStorageSync('userInfo')
    })
  },
 
  //获取医生个人信息
  loadings: function() {
    var doctorId = wx.getStorageSync('userid');
    console.log(doctorId)
    var that = this;
    app.request({
      url: 'doctor/doctor/doctorDetail',
      data: {
        'doctorId': doctorId
      },
      success(res) {
        var a = res.data[0].serviceName;
        var onename = a.join(",");
        that.setData({
          avatarUrls: res.data[0].photo,
          name: res.data[0].name, 
          cardNumber: res.data[0].cardNumber,
          dage: res.data[0].dage,
          company: res.data[0].company,
          position: res.data[0].position,
          address: res.data[0].address,
          content: res.data[0].intro,       
          provincename: res.data[0].proName,
          cityname: res.data[0].areaName,
          districtname: res.data[0].townName,  
          onename: onename         
        })
      }
    })
  },
  /**
   * 生命周期函数--监听页面初次渲染完成
   */
  onReady: function() {

  },

  /**
   * 生命周期函数--监听页面显示
   */
  onShow: function() {

  },

  /**
   * 生命周期函数--监听页面隐藏
   */
  onHide: function() {

  },

  /**
   * 生命周期函数--监听页面卸载
   */
  onUnload: function() {

  },

  /**
   * 页面相关事件处理函数--监听用户下拉动作
   */
  onPullDownRefresh: function() {

  },

  /**
   * 页面上拉触底事件的处理函数
   */
  onReachBottom: function() {

  },

  /**
   * 用户点击右上角分享
   */
  onShareAppMessage: function() {

  }
})